package cn.edu.neu.softlab633.influencemaximization.sy.datapreprocessing;

import java.io.*;

/**
 * Created by Jason on 2017/5/8.
 */
public class AlignmentData {
    public static void influendeSpread() throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("data/FT/alignment.csv"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("data/FT/alignment_topic_1.csv"));
        String line;
        while ((line = br.readLine()) != null) {
            int fid = Integer.valueOf(line.split(",")[0]);
            int tid = Integer.valueOf(line.split(",")[1]);
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < ConstantTopic.topicNum; i++) {
                sb.append((Math.random() % 0.5) + " ");
            }
            bw.write(fid + "," + tid + "," + sb);
            bw.newLine();
        }
        br.close();
        bw.close();
    }
}
